package learn_concurrent._1;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class T11 {
	final static Logger logger = LoggerFactory.getLogger(T11.class);

	static int r = 0;
	
	public static void main(String[] args) {
		test1();
	}

	private static void test1() {
		logger.debug("start...");
		Thread t1 = new Thread(() -> {
			logger.debug("start......");
			try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			logger.debug("end......");
			r = 10;
		});
		t1.start();
		try {
			t1.join();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		logger.debug("r = {}", r);
		logger.debug("end...");
	}

}
